var xorOperation = function (n, start) {
    let arr = []
    while (arr.length < n) {
        arr.push(start + 2 * (arr.length))
    }
    console.log(arr);

    let result = arr[0]
    for (let i = 1; i < arr.length; i++) {
        result = result ^ arr[i]
    }
    return result
}